package com.myworld.service.impl;

import com.myworld.mapper.PersonMapper;
import com.myworld.model.Person;
import com.myworld.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PersonServiceImpl implements PersonService{
	
	@Autowired
	private PersonMapper personMapper;
    
	
	@Override
	public Person findById(String id) {
		System.out.println("-------"+0+"-------");
		return personMapper.selectByPrimaryKey(id);
	}

	@Override
	public void deleteFromCache(String id) {
		System.out.println("删除...........");
		//personMapper.deleteByPrimaryKey(id+"");
	}

    
	
	@Override
	public Person findById1(String id) {
		System.out.println("-------"+1+"-------");
		return personMapper.selectByPrimaryKey(id);
	}

}
